package com.megvii.koala.constance;

import java.util.ArrayList;
import java.util.HashMap;

public class Constant {

	public static String city = "未知";

	public static String KEY_IPADDRESS = "key_ipaddress";

	// 控制线程池中的线程数量
	public static final int POOL_THREADS_COUNT = 6;
	// 网络连接点
	public static int http_type = 0;

	public static String companyId;
	public static String Cookie;
	public static String Group;

    public static final String KEY_VISITORBEAN = "key_visitorbean";
	public static final String KEY_COOKIE = "key_cookie";
	public static final String KEY_ID = "key_id";
	public static final String KEY_IMAGEPATH = "key_imagepath";
	public static final String KEY_INFOBEAN = "key_infobean";
	public static final String KEY_MAINBEAN = "key_mainbean";
	public static final String KEY_DATE = "key_date";
	public static final String KEY_DESCRIPTION = "key_description";
	public static final String KEY_SCANSUCCESS = "key_scansuccess";
	public static final String KEY_VISITORALLLIST = "key_visitoralllist";
    public static final String KEY_ISPUSHVISITOR = "key_ispushvisitor";
    
	public static String showIcon_path;
	public static String description;
	public static ArrayList<String> IPList;
	public static int position_id = -1;

	/**
	 * 文件图片存储目录
	 */
	// public static String SDCardRoot =
	// Environment.getExternalStorageDirectory()
	// .getAbsolutePath() + File.separator;
	//
	// public static String cacheImage = SDCardRoot + "deess_cache/img";
	// public static String cacheText = SDCardRoot + "dress_cache/text";
	public static String cacheText = "KoalacamEach_text";
	public static String cacheImage = "KoalacamEach_image";
	public static String cacheApk = "KoalacamEach_apk";
	public static String IP = "v2.koalacam.net";
	public static String ROOTADDRESS = "https://" + IP;
//	public static String ROOTADDRESS = "http://10.101.2.221";
	
	// 登录地址
	public static String LOGIN_URL = ROOTADDRESS + "/mobile/login";
	public static String UPDATEPASSWORD_URL = ROOTADDRESS
			+ "/mobile/update-password";// 重置密码
	public static String USERNAMEINFO_URL = ROOTADDRESS + "/mobile/user-info";// 用户信息
	public static String HISTORYLIST_URL = ROOTADDRESS
			+ "/mobile/attendance/list";// 考勤列表信息
	public static String CLOCKINLIST_URL = ROOTADDRESS
			+ "/mobile/attendance/day";// 打卡记录信息
	public static String UPDATEAVATAR_URL = ROOTADDRESS
			+ "/mobile/update-avatar";// 上传展示头像
	public static String VISTORYDISPLAYICON_URL = ROOTADDRESS
			+ "/mobile/visitor/update-avatar/";// 访客上传展示头像
	//public static String SAOMIAOPHOTO_URL = "";// 扫描
	public static String PUTUSERINFO_URL = ROOTADDRESS + "/mobile/user-info";// 设置签名（PUT请求）
	public static String PUTVISITORINFO_URL = ROOTADDRESS + "/mobile/visitor/";// 更改访客信息（PUT请求）
	public static String GETVISITORS_URL = ROOTADDRESS + "/mobile/visitors";// 获取自己的访客列表
	public static String ADDVISITOR_URL = ROOTADDRESS + "/mobile/add-visitor";// 邀请访客
	public static String UPSCANPHOTO_URL = ROOTADDRESS + "/mobile/subject/photo";// 上传识别照片
	public static String DELETEPHOTO_URL = ROOTADDRESS + "/mobile/subject/photo/";// 删除识别照片
	public static String DELETEVISITOR_URL = ROOTADDRESS + "/mobile/visitor/";// 删除访客
	public static String VISITORHISTORY_URL = ROOTADDRESS
			+ "/mobile/visitors/history";// 来访历史列表信息
	public static String GETVISITORINFO_URL = ROOTADDRESS + "/mobile/visitor/";// 获取个人信息数据
	
	public static void setIP(String ip){
		ROOTADDRESS = ip;
		LOGIN_URL = ROOTADDRESS + "/mobile/login";
		UPDATEPASSWORD_URL = ROOTADDRESS + "/mobile/update-password";// 重置密码
		USERNAMEINFO_URL = ROOTADDRESS + "/mobile/user-info";// 用户信息
		HISTORYLIST_URL = ROOTADDRESS + "/mobile/attendance/list";// 考勤列表信息
		CLOCKINLIST_URL = ROOTADDRESS + "/mobile/attendance/day";// 打卡记录信息
		UPDATEAVATAR_URL = ROOTADDRESS + "/mobile/update-avatar";// 上传展示头像
		PUTUSERINFO_URL = ROOTADDRESS + "/mobile/user-info";// 设置签名
		GETVISITORS_URL = ROOTADDRESS + "/mobile/visitors";// 获取自己的访客列表
		ADDVISITOR_URL = ROOTADDRESS + "/mobile/add-visitor";// 邀请访客
		PUTVISITORINFO_URL = ROOTADDRESS + "/mobile/visitor/";// 更改访客信息（PUT请求）
		VISTORYDISPLAYICON_URL = ROOTADDRESS
				+ "/mobile/visitor/update-avatar/";// 访客上传展示头像
		UPSCANPHOTO_URL = ROOTADDRESS + "/mobile/subject/photo";// 上传识别照片
		VISITORHISTORY_URL = ROOTADDRESS
				+ "/mobile/visitors/history";// 来访历史列表信息
		DELETEPHOTO_URL = ROOTADDRESS + "/mobile/subject/photo/";// 删除识别照片
		DELETEVISITOR_URL = ROOTADDRESS + "/mobile/visitor/";// 删除访客
		GETVISITORINFO_URL = ROOTADDRESS + "/mobile/visitor/";// 获取个人信息数据
	}
	

	public static String getScanPhoto_url(String IP) {//获取识别地址
		return "http://" + IP + ":8866/checkin";
	}

	// 新包下载地址
	public static String getNewApk = "http://oss.aliyuncs.com/facepp-content/koalacam/koalacam_hr.apk";
}
